#ifndef _MoveCommand_h_
#define _MoveCommand_h_

#include "Command.h"

class MoveCommand : public Command {
public:
	MoveCommand() : Command(), z(0), type(1) {}
	MoveCommand (int q, int w, int e) : Command(q,w), z(e), type(1) {}
  ~MoveCommand() { }

  virtual string toString() {
		stringstream ss;
    ss << Command::toString() << " Z:" << z;
		return ss.str();
  }

	virtual void setValues(int q, int w) {
		Command::setValues(q,w);
		z = 0;
	}

  virtual void save(ofstream &ofs) {
		ofs.write((char*) &type, sizeof(int));
		Command::save(ofs);
		ofs.write((char*) &z, sizeof(int));
  }

  virtual void load(ifstream &ifs) {
		Command::load(ifs);
		ifs.read((char*) &z, sizeof(int));
  }	

private:
	int z;
	int type;
};

#endif

